<?php
/* Smarty version 3.1.34-dev-7, created on 2020-07-06 10:03:29
  from 'D:\php_demo\kindergarten\application\views\templates\index.html' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.34-dev-7',
  'unifunc' => 'content_5f0286715c2701_95477182',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '6cbe0870b55190e7c9e225bb3e920fe979df2326' => 
    array (
      0 => 'D:\\php_demo\\kindergarten\\application\\views\\templates\\index.html',
      1 => 1594001005,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5f0286715c2701_95477182 (Smarty_Internal_Template $_smarty_tpl) {
?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>首页</title>
		<!-- import CSS -->
		<link href="https://cdn.bootcdn.net/ajax/libs/element-ui/2.13.2/theme-chalk/index.css" rel="stylesheet">
		<?php echo '<script'; ?>
 src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"><?php echo '</script'; ?>
>
		<!-- import Vue before Element -->
		<?php echo '<script'; ?>
 src="/html/vue.js"><?php echo '</script'; ?>
>
		<!-- import JavaScript -->
		<?php echo '<script'; ?>
 src="https://cdn.bootcdn.net/ajax/libs/element-ui/2.13.2/index.js"><?php echo '</script'; ?>
>
		<?php echo '<script'; ?>
 src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"><?php echo '</script'; ?>
>
	</head>
	<body>
		<div id="app" style='width: 100%; height: 100%;'>
			<el-container style="height: 100%; border: 1px solid #eee">
				<el-aside width="200px">
					<el-menu :default-openeds="['1', '3']">
						<el-submenu index="1">
							<template slot="title"><i class="el-icon-message"></i>导航一</template>
							<el-menu-item-group>
								<template slot="title">分组一</template>
								<el-menu-item index="1-1" class="el-menu-item is-active">文章管理</el-menu-item>
								<el-menu-item index="1-2">文章编写</el-menu-item>
							</el-menu-item-group>
							<el-menu-item-group title="分组2">
								<el-menu-item index="1-3">选项3</el-menu-item>
							</el-menu-item-group>
							<el-submenu index="1-4">
								<template slot="title">选项4</template>
								<el-menu-item index="1-4-1">选项4-1</el-menu-item>
							</el-submenu>
						</el-submenu>
						<el-submenu index="2">
							<template slot="title"><i class="el-icon-menu"></i>导航二</template>
							<el-menu-item-group>
								<template slot="title">分组一</template>
								<el-menu-item index="2-1">选项1</el-menu-item>
								<el-menu-item index="2-2">选项2</el-menu-item>
							</el-menu-item-group>
							<el-menu-item-group title="分组2">
								<el-menu-item index="2-3">选项3</el-menu-item>
							</el-menu-item-group>
							<el-submenu index="2-4">
								<template slot="title">选项4</template>
								<el-menu-item index="2-4-1">选项4-1</el-menu-item>
							</el-submenu>
						</el-submenu>
						<el-submenu index="3">
							<template slot="title"><i class="el-icon-setting"></i>导航三</template>
							<el-menu-item-group>
								<template slot="title">分组一</template>
								<el-menu-item index="3-1">选项1</el-menu-item>
								<el-menu-item index="3-2">选项2</el-menu-item>
							</el-menu-item-group>
							<el-menu-item-group title="分组2">
								<el-menu-item index="3-3">选项3</el-menu-item>
							</el-menu-item-group>
							<el-submenu index="3-4">
								<template slot="title">选项4</template>
								<el-menu-item index="3-4-1">选项4-1</el-menu-item>
							</el-submenu>
						</el-submenu>
					</el-menu>
				</el-aside>

				<el-container>
					<el-header style="text-align: right; font-size: 12px">
						<el-dropdown>
							<i class="el-icon-setting" style="margin-right: 15px"></i>
							<el-dropdown-menu slot="dropdown">
								<el-dropdown-item>查看</el-dropdown-item>
								<el-dropdown-item>新增</el-dropdown-item>
								<el-dropdown-item>删除</el-dropdown-item>
							</el-dropdown-menu>
						</el-dropdown>
						<span>{{ name }}</span>
					</el-header>
					<el-main>
						<el-breadcrumb separator="/" style='padding-bottom: 20px;'>
							<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
							<el-breadcrumb-item><strong>文章管理</strong></el-breadcrumb-item>
						</el-breadcrumb>
						
						<div>
							<h4>筛选</h4>
							<template>
							  <el-select v-model="content" placeholder="请选择分类">
							    <el-option
							      v-for="item in content_arrs"
							      :key="item.value"
							      :label="item.label"
							      :value="item.value">
							    </el-option>
							  </el-select>
							    <el-input
							      placeholder="请输入标题"
							      prefix-icon="el-icon-search"
							      v-model="like" style='width: 200px; margin-left: 20px;' >
							    </el-input>
								<el-button type="primary" plain style='margin-left: 20px;'>查询</el-button>
							</template>
						</div>
						
						<template>
							<el-table :data="tableData" style="width: 100%" stripe fixed>
								<el-table-column prop="title" label="标题" width="180">
								</el-table-column>
								<el-table-column prop="introduction" label="新闻简介" width="180">
								</el-table-column>
								<el-table-column prop="category" label="新闻类别" width="180">
								</el-table-column>
								<el-table-column prop="time" label="发布时间" sortable>
								</el-table-column>
								<el-table-column fixed="right" label="操作" width="150">
									<template slot-scope="scope">
										<el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
										<el-button type="text" size="small">编辑</el-button>
										<el-button type="text" size="small">删除</el-button>
									</template>
								</el-table-column>
							</el-table>
						</template>
					</el-main>

				</el-container>
			</el-container>
		</div>
		<?php echo '<script'; ?>
>
			new Vue({
				el: '#app',
				data: function() {
					return {
						page: 1,
						limit: 20,
						like: null,
						content: null, //文章类别
						tableData: [],
						name:"admin",
						content_arrs: [{
						          value: '1',
						          label: '栏目A'
						        }, {
						          value: '2',
						          label: '栏目B'
						        }, {
						          value: '3',
						          label: '栏目C'
						        }]
					}
				},
				methods: {
					handleClick(row) {
						console.log(row);
					}
				},
				mounted: function() {
					var me = this;
					console.log('beforeMount');
					//查询
					axios
						.get('/index.php/news/select_news', {
							params: {
								page: 1,
								limit: 20,
								like: "",
								content: ""
							}
						})
						.then(function(response) {
							console.log(response);
							me.tableData = response.data;
						})
						.catch(function(error) { // 请求失败处理
							console.log(error);
						});
				}
			})
		<?php echo '</script'; ?>
>
		<style>
			.el-header {
				background-color: #D9ECFF;
				color: #303133;
				line-height: 60px;
			}
		</style>
	</body>
</html>
<?php }
}
